home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
fgl105c.zip
/
05-08.C
< prev
next >
Wrap
Text File
|
1991-05-05
|
630b
|
37 lines
#define COLORS 16
#define WIDTH 40
main()
{
int base;
int color;
int minx, maxx;
int mode;
mode = fg_getmode();
fg_setmode(16);
base = 0;
minx = 0;
maxx = WIDTH - 1;
for (color = 0; color < COLORS; color++) {
fg_palette(color,0);
fg_setcolor(color);
fg_rect(minx,maxx,0,349);
minx = maxx + 1;
maxx = maxx + WIDTH;
}
while (base < COLORS*4) {
for (color = 0; color < COLORS; color++)
fg_palette(color,base+color);
base += COLORS;
fg_waitkey();
}
fg_setmode(mode);
fg_reset();
}